# coding=utf-8
import maya.cmds as mc
#import core as timelimit
def offset_anicurve():
	#if timelimit.ProductActivation().Win() == 0:
	#	return
	anim_curves = mc.ls(type='animCurve')  
	
	get_max_start = mc.playbackOptions(q=True,ast=True)
	get_max_end = mc.playbackOptions(q=True,aet=True)
	
	
	offset = get_max_start - 101
	
	for each in anim_curves:  
		#if mc.connectionInfo('%s.input'%each,isDestination = True) == False:
			
		mc.keyframe(each, edit=True, relative=True, timeChange=-offset)  
	
	end_frame=  101 + (get_max_end - get_max_start)
	
	set_min_start = mc.playbackOptions(e=1,min=101)
	set_min_end = mc.playbackOptions(e=1,max=end_frame)
	
	set_max_start = mc.playbackOptions(e=True,ast=101)